package com.watercloud.service.impl;

import com.pojo.Device;
import com.pojo.Update;
import com.watercloud.dao.DeviceDao;
import com.watercloud.service.DeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class DeviceServiceImpl implements DeviceService {

    @Autowired
    DeviceDao deviceDao;

    @Override
    public List<Device> selectDevice(Device device) {
        return deviceDao.selectDevice(device);
    }

    @Override
    public boolean updateDevice(Update update) {
        int res = deviceDao.updateDevice(update);
        if (res>0)
            return true;
        else
            return false;
    }
}
